@isTest
private class GetUnfinishAssignTaskShcedulerTest {
    static testMethod void testMethod1() {

    	//GetUnfinishAssignTaskUtil.execute();
		//GetUnfinishAssignTaskUtil.execute();



       // GetUnfinishAssignTaskUtil.sycnLockNC('MKSY', new List<String>{'test'}, 'test');
        //GetUnfinishAssignTaskShceduler getun = new GetUnfinishAssignTaskShceduler();
		//System.schedule('GetUnfinishAssignTaskShceduler', '0 0 0 15 3 ? 2022', getun);

        Account acc = TestUtils.createAccount();
        acc.NCICCode__c = '123456';
        acc.RecordTypeId = Utils.getRecordTypeIdByDevNameAndObjName('Dealer', 'Account');
        insert acc;

        ApplicationForUnqualifiedDelive__c apd = new ApplicationForUnqualifiedDelive__c();
        apd.Account__c = acc.Id;
        apd.Company__c = 'MKSY';

       // apd.NCICCode__c = '123456';
        apd.Year__c = System.today().year()+'年';
        apd.Quarter__c = '一季度';
        apd.IfMoreCompany__c = true;
        apd.Status__c= '草案中';

        insert apd;


        apd.Status__c = '审批成功';
        update apd;

        System.debug(ApplicationForUnqualifiedDeliveHandler.backToNc(apd.Id));
        System.debug([select Id,NCLock__c from ApplicationForUnqualifiedDelive__c where Id=:apd.Id ]);



        // AsyncLockToNCQueueable aq = new AsyncLockToNCQueueable();
        // aq.comcode ='MKSY';
        // aq.tmp = new Set<String>{'testcode'};
        //  try {
        //     aq.execute();
        // }catch (Exception e) {
            
        // }
        // try {
        //     System.enqueueJob(aq);
        // }catch (Exception e) {
            
        // }
        
        



    }
}